package com.lirh.queue.rabbitmqcustom.service;

import lombok.extern.log4j.Log4j;
import lombok.extern.log4j.Log4j2;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Log4j2
@Component
public class ApiReportReceive {
    @RabbitListener(queues = "api.report.payment")
    @RabbitHandler
    public void payment(String msg){
        System.out.println(("api.report.payment:"+msg));
      log.info("api.report.payment:"+msg);
    }
    @RabbitListener(queues = "api.report.refund")
    @RabbitHandler
    public void refund(String msg){
        System.out.println(("api.report.payment:"+msg));
        log.info("api.report.refund:"+msg);
    }

}
